<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:uddi="urn:uddi-org:api_v3">
	<xsl:output method="xml" encoding="UTF-8"/>

	<xsl:include href="keyedreference.xsl"/>

	<!-- Match the identifier bag UDDI element -->
	<xsl:template match="uddi:identifierBag">
		<xsl:variable name="keyedReferenceCount"><xsl:value-of select="count(uddi:keyedReference)"/></xsl:variable>		
		<fieldset>
			<legend>Identifier Bag [<xsl:value-of select="$keyedReferenceCount"></xsl:value-of>]</legend>
			<xsl:if test="$keyedReferenceCount > 0">
				<table>
					<tr>
						<th>UDDI ID</th>
						<th>KeyName</th>
						<th>KeyValue</th>
					</tr>
					<xsl:apply-templates select="uddi:keyedReference"/>
				</table>
			</xsl:if>
		</fieldset>
	</xsl:template>

</xsl:stylesheet>